import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import home from '@/components/home'
import first from '@/components/first'
import second from '@/components/second'
import secondson from '@/components/secondson'
import secondchild from '@/components/secondchild'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/home',
      name: 'home',
      component: home,
      children: [
        {
          path: '/home/first',
          name: 'first',
          component: first
        },
        {
          path: '/home/second',
          name: 'second',
          component: second,
          children: [
            {
              path: '/home/second/son',
              name: 'secondson',
              component: secondson
            },
            {
              path: '/home/second/child',
              name: 'secondchild',
              component: secondchild
            }
          ]
        }
      ]
    }
  ]
})
